#include <stdio.h>

long splitNumber(long);

int main()
{
    long X;
    printf("Input the number to split: ");
    scanf("%ld", &X);
    
    splitNumber(X);

    return 0;
}

long splitNumber(long Number)
{
    if (Number == 1)
        return 0;

    for (long i = 2; i <= Number; i++) {
        if (Number % i == 0) {
            printf("%ld ", i);
            return splitNumber(Number / i);
        }
    }

    return 1;
}